home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 28
/
Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso
/
Aminet
/
dev
/
e
/
kyz_obj.lha
/
doc
/
simplebitfield.doc
< prev
next >
Wrap
Text File
|
1998-10-18
|
2KB
|
96 lines
TABLE OF CONTENTS
simplebitfield.m/--overview--
simplebitfield.m/bit_operations
simplebitfield.m/clearfield
simplebitfield.m/end
simplebitfield.m/new
simplebitfield.m/--overview-- simplebitfield.m/--overview--
PURPOSE
To provide a simple bitfield.
OVERVIEW
Implements the same concepts as bitfield.m, but a great many
services are removed or simplified, for applications where only
the simple get/set/clear functionality of a bitfield is needed.
SEE ALSO
bitfield.m
simplebitfield.m/bit_operations simplebitfield.m/bit_operations
NAME
simplebitfield.set() -- set an individual bit.
simplebitfield.clear() -- clear an individual bit.
simplebitfield.test() -- test an individual bit.
SYNOPSIS
state := set(bit)
state := clear(bit)
state := test(bit)
FUNCTION
Will test, then perform an operation on an individual bit in the
bitfield:
set() will set the bit to boolean TRUE.
clear() will clear the bit to boolean FALSE.
test() will perform no altering operation on the bit.
The bit specified must not lie outwith the range stored by the
bitfield, otherwise innocent data _will_ be corrupted.
INPUTS
bit - the bit to perform an operation on.
RESULT
state - the previous state of the bit before the operation was
performed on it, either TRUE or FALSE.
simplebitfield.m/clearfield simplebitfield.m/clearfield
NAME
simplebitfield.clearfield() -- clear all bits.
SYNOPSIS
clear()
FUNCTION
Clears all bits in the bitfield to boolean FALSE.
simplebitfield.m/end simplebitfield.m/end
NAME
simplebitfield.end() -- Destructor.
SYNOPSIS
end()
FUNCTION
Frees resources used by an instance of the bitfield class.
SEE ALSO
new()
simplebitfield.m/new simplebitfield.m/new
NAME
simplebitfield.new() -- Constructor.
SYNOPSIS
new(max)
FUNCTION
Initialises an instance of the bitfield class. Raises exception
"MEM" if it cannot allocate enough memory for the required number
of bits. All bits are initially cleared.
INPUT
max - the maximum integer value that will be represented in the
field. Must be positive. The minimum will be 0.
SEE ALSO
end(), clearfield()